import request from '@/utils/request'

// 分类：获取文章分类
export const getArticleService = () => request.get('/my/cate/list')
// 分类：添加文章分类
export const addArticleService = (data) => request.post('/my/cate/add', data)
// 分类：修改文章分类
export const updateArticleService = (data) => request.put('/my/cate/info', data)
// 分类：删除文章分类
export const deleteArticleService = (id) =>
  request.delete('/my/cate/del', {
    params: {
      id
    }
  })

// 文章：获取
export const getArticleListService = (params) =>
  request.get('/my/article/list', { params })

// 文章：添加
export const addPublishServeice = (data) =>
  request.post('/my/article/add', data)

// 文章：获取详情
export const getArticleDetail = (id) =>
  request.get('/my/article/info', {
    params: { id }
  })

// 文章：编辑
export const editorArticleService = (data) =>
  request.put('/my/article/info', data)

// 文章：删除
export const deleteArticle = (id) =>
  request.delete('/my/article/info', {
    params: { id }
  })
